﻿using Siasun.AFC.RtPlatfromGui.UI.PageUI;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Siasun.AFC.RtPlatfromGui.UI.BusinessHelper
{
    public static class DetailPageListHelper
    {
        private static Dictionary<string, DetailBasePage> _detailPageList 
            = new Dictionary<string, DetailBasePage>();

        public static DetailBasePage DFindPage(string pageName)
        {
            //此处显示窗体提示寻找窗体失败
            if (!_detailPageList.ContainsKey(pageName)) return new DetailBasePage();

            return _detailPageList[pageName];
        }

        public static bool DConainKey(string pageName)
        {
            return _detailPageList.ContainsKey(pageName);
        }

        public static void DListAdd(string pageName, DetailBasePage page)
        {
            _detailPageList.Add(pageName, page);
        }

        public static void DListClear()
        {
            _detailPageList.Clear();
        }
    }
}
